extends cmslayout
block header
  title #{movie.originalname} | #{portal.title}
  link(rel='stylesheet', href='/stylesheets/swiper.min.css')
block content
  .tabs-container#swiper-container
    .swiper-wrapper
      a.tag.swiper-slide(href="/movies#all",data-hash="all") 全部
      each category in categories
        if movie.category == category.title
          a.tag.current.swiper-slide(href="/category/#{category.title}##{category.title}",data-hash="#{category.title}") #{category.title}
        else
          a.tag.swiper-slide(href="/category/#{category.title}##{category.title}",data-hash="#{category.title}") #{category.title}
  .layui-container.mt-20
    .layui-row.layui-col-space20
      .layui-col-md12
        .waterfall
          .card.nopadding.flexauto
            .play
              iframe(src="/share/#{movie._id}", frameborder="0",allowfullscreen)
            .card-body
              h1 #{movie.originalname}
              hr
              h2.title 分享链接
              p(style="font-size:12px;color:#333;") 粘贴到论坛或博客中
              input.layui-input(type="text",disabled,value="<iframe height=498 width=510 src='#{portal.host}/share/#{movie._id}' frameborder=0 'allowfullscreen'></iframe>")
              p(style="font-size:12px;color:#333;margin-top:10px;") 直接粘贴到QQ或微信
              input.layui-input(type="text",disabled,value="#{portal.host}/share/#{movie._id}")
              p(style="font-size:12px;color:#333;margin-top:10px;") 友情提示
              input.layui-input(type="text",disabled,value="无论手机还是电脑，本站都推荐使用火狐浏览器观看")
              h2.title 视频截图
              - var n = 0
              if movie.poster
                img(src="#{movie.poster}")
              while n < portal.screenshots
                img(src="/videos/#{movie._id}/#{++n}.jpg")
append script
  script(src="/javascripts/swiper.min.js")
  script.
    var navSwiper = new Swiper('#swiper-container', {
        freeMode: true,
        slidesPerView: 'auto',
        freeModeSticky: true,
        hashNavigation: true
    });
    $(window).scroll(function(){
      if($(window).scrollTop()>60) {
        $("#swiper-container").css({"position":"fixed","top":0,"left":0,"z-index":100})
      } else {
        $("#swiper-container").css({"position":"relative"})
      }
    })
              
          